home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1987 May
/
1987-05.d64
/
date_time loader
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
982b
|
31 lines
10 rem speedscript date/time boot program
20 a$="speedscript date"
30 if a=0 then a=1:print"[147][151]loading..."a$:load a$,8,1
40 print chr$(147) spc(131) a$
50 ml=51451:cl=51823:u$=chr$(145)+chr$(145)
60 print spc(85)"set the date (mn/dt/yr)":print
70 input"month (1-12) [157][157][157][157][157]";mn
80 if mn<1 or mn>12 then print u$:goto70
90 input" date (1-31) [157][157][157][157][157]";dt
100 if dt<1 or dt>31 then print u$:goto90
110 input" year (86-99) [157][157][157][157][157]";yr
120 if yr<86 or yr>99 then print u$:goto110
130 print spc(85)"set the time (hr/ms/am-pm)":print
140 input"hours (1-12) [157][157][157][157][157]";hr
150 if hr<1 or hr>12 then print u$:goto140
160 input" mins (0-59) [157][157][157][157][157]";ms
170 if ms >59 then print u$:goto160
180 input"am-pm (a/p) [157][157][157][157][157]";p$
190 if p$ <>"a" and p$<>"p"then print u$:goto180
200 flag=128:if p$="a"and hr<12 then flag=0
210 if p$="p"and hr=12 then flag=0
220 by=hr:gosub300:hr=by or flag
230 by=ms:gosub300:ms=by
240 poke cl,ms:poke cl+1,hr:poke cl+2,mn
250 poke cl+3,dt:poke cl+4,yr
260 print:print"put speedscript disk in drive 0, unit 8"
270 print" - when ready, press return.":sys 65487:sys ml
280 poke 52578,240:poke 52579,20
290 end
300 x=int(by/10):y=by-10*x:by=16*x+y:return